feat: auth
This commit is contained in:
1 parent
8cb7fed6ef
commit
fdec33ae64
6 files changed
+35
-9
No files matched your search
@@ -8,6 +8,10 @@ import yts from './parsers/yts';
|
||||
import http from './Http';
|
||||
import { Sort } from './parsers';
|
||||
|
||||
export const createRequestToken = async () => {
|
||||
return http.get<RequestToken>('/authentication/token/new').then(({ request_token }) => request_token);
|
||||
};
|
||||
|
||||
export const search = async ({
|
||||
query,
|
||||
page,
|
||||
|
||||
@@ -0,0 +1,13 @@
|
||||
import { UserRound } from 'lucide-react';
|
||||
|
||||
import { Button } from '@/components/ui/button';
|
||||
|
||||
const User = () => {
|
||||
return (
|
||||
<Button variant='ghost' size='icon'>
|
||||
<UserRound size={20} />
|
||||
</Button>
|
||||
);
|
||||
};
|
||||
|
||||
export default User;
|
||||
@@ -7,6 +7,7 @@ import { cn } from '@/lib/utils';
|
||||
import { DesktopNavigation, MobileNavigation } from './components/Navigation';
|
||||
import ToggleSearch from './components/Search';
|
||||
import ToggleTheme from './components/ThemeToggle';
|
||||
import User from './components/User';
|
||||
|
||||
interface Props {
|
||||
className?: string;
|
||||
@@ -28,6 +29,7 @@ const Header: FC<Props> = ({ className }) => (
|
||||
<div className='flex items-center gap-2'>
|
||||
<ToggleTheme />
|
||||
<ToggleSearch />
|
||||
<User />
|
||||
<MobileNavigation />
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Generated
+9
-8
@@ -27,7 +27,7 @@
|
||||
"eslint-config-next": "^14.2.7",
|
||||
"jotai": "^2.2.2",
|
||||
"js-cookie": "^3.0.5",
|
||||
"lucide-react": "^0.263.0",
|
||||
"lucide-react": "^0.453.0",
|
||||
"media-icons": "^1.1.5",
|
||||
"next": "^14.2.7",
|
||||
"node-html-parser": "^6.1.5",
|
||||
@@ -5137,11 +5137,12 @@
|
||||
}
|
||||
},
|
||||
"node_modules/lucide-react": {
|
||||
"version": "0.263.0",
|
||||
"resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.263.0.tgz",
|
||||
"integrity": "sha512-F+rHswbbI1xuDZ/OzofiJZJVlBPOIYVVST705cPdRLImJ5aOJNXYaFBPNo3qdUV0iEG/4nZeiUtLSHO2qU2ISw==",
|
||||
"version": "0.453.0",
|
||||
"resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.453.0.tgz",
|
||||
"integrity": "sha512-kL+RGZCcJi9BvJtzg2kshO192Ddy9hv3ij+cPrVPWSRzgCWCVazoQJxOjAwgK53NomL07HB7GPHW120FimjNhQ==",
|
||||
"license": "ISC",
|
||||
"peerDependencies": {
|
||||
"react": "^16.5.1 || ^17.0.0 || ^18.0.0"
|
||||
"react": "^16.5.1 || ^17.0.0 || ^18.0.0 || ^19.0.0-rc"
|
||||
}
|
||||
},
|
||||
"node_modules/media-captions": {
|
||||
@@ -10383,9 +10384,9 @@
|
||||
}
|
||||
},
|
||||
"lucide-react": {
|
||||
"version": "0.263.0",
|
||||
"resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.263.0.tgz",
|
||||
"integrity": "sha512-F+rHswbbI1xuDZ/OzofiJZJVlBPOIYVVST705cPdRLImJ5aOJNXYaFBPNo3qdUV0iEG/4nZeiUtLSHO2qU2ISw==",
|
||||
"version": "0.453.0",
|
||||
"resolved": "https://registry.npmjs.org/lucide-react/-/lucide-react-0.453.0.tgz",
|
||||
"integrity": "sha512-kL+RGZCcJi9BvJtzg2kshO192Ddy9hv3ij+cPrVPWSRzgCWCVazoQJxOjAwgK53NomL07HB7GPHW120FimjNhQ==",
|
||||
"requires": {}
|
||||
},
|
||||
"media-captions": {
|
||||
|
||||
+1
-1
@@ -29,7 +29,7 @@
|
||||
"eslint-config-next": "^14.2.7",
|
||||
"jotai": "^2.2.2",
|
||||
"js-cookie": "^3.0.5",
|
||||
"lucide-react": "^0.263.0",
|
||||
"lucide-react": "^0.453.0",
|
||||
"media-icons": "^1.1.5",
|
||||
"next": "^14.2.7",
|
||||
"node-html-parser": "^6.1.5",
|
||||
|
||||
Vendored
+6
@@ -165,3 +165,9 @@ interface FileStat {
|
||||
path: string;
|
||||
length: number;
|
||||
}
|
||||
|
||||
interface RequestToken {
|
||||
success: boolean;
|
||||
expires_at: string;
|
||||
request_token: string;
|
||||
}
|
||||
Reference in new issue
Block a user