mirror of
https://github.com/muerwre/vault-frontend.git
synced 2025-04-25 04:46:40 +07:00
Добавили заметки в сайдбар (#126)
* added notes sidebar * added note dropping and editing * added sidebar navigation * handling sidebarchanges over time * using router back for closing sidebar * fixed tripping inside single sidebar * added superpowers toggle to sidebar * user button opens sidebar now * added profile cover for profile sidebar * removed profile sidebar completely * ran prettier over project * added note not found error literal
This commit is contained in:
parent
fe3db608d6
commit
5d34090238
72 changed files with 1241 additions and 664 deletions
|
@ -1,18 +1,16 @@
|
|||
import { useCallback, useEffect } from 'react';
|
||||
import { useCallback, useEffect } from "react";
|
||||
|
||||
import isBefore from 'date-fns/isBefore';
|
||||
import isBefore from "date-fns/isBefore";
|
||||
|
||||
import { useRandomPhrase } from '~/constants/phrases';
|
||||
import { useAuth } from '~/hooks/auth/useAuth';
|
||||
import { useLastSeenBoris } from '~/hooks/auth/useLastSeenBoris';
|
||||
import { useBorisStats } from '~/hooks/boris/useBorisStats';
|
||||
import { IComment } from '~/types';
|
||||
import { useRandomPhrase } from "~/constants/phrases";
|
||||
import { useLastSeenBoris } from "~/hooks/auth/useLastSeenBoris";
|
||||
import { useBorisStats } from "~/hooks/boris/useBorisStats";
|
||||
import { IComment } from "~/types";
|
||||
|
||||
export const useBoris = (comments: IComment[]) => {
|
||||
const title = useRandomPhrase('BORIS_TITLE');
|
||||
const title = useRandomPhrase("BORIS_TITLE");
|
||||
|
||||
const { lastSeen, setLastSeen } = useLastSeenBoris();
|
||||
const { isTester, setIsTester } = useAuth();
|
||||
|
||||
useEffect(() => {
|
||||
const last_comment = comments[0];
|
||||
|
@ -32,12 +30,5 @@ export const useBoris = (comments: IComment[]) => {
|
|||
|
||||
const { stats, isLoading: isLoadingStats } = useBorisStats();
|
||||
|
||||
const setIsBetaTester = useCallback(
|
||||
(isTester: boolean) => {
|
||||
setIsTester(isTester);
|
||||
},
|
||||
[setIsTester]
|
||||
);
|
||||
|
||||
return { setIsBetaTester, isTester, stats, title, isLoadingStats };
|
||||
return { stats, title, isLoadingStats };
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue