refactor: make components more modular
would help in implementing name route also did some stylistic changes
This commit is contained in:
3
src/interfaces/shared/index.ts
Normal file
3
src/interfaces/shared/index.ts
Normal file
@ -0,0 +1,3 @@
|
||||
import type Name from './name';
|
||||
|
||||
export type Media = Name['media']; // exactly the same in title and name
|
@ -1,8 +1,6 @@
|
||||
import cleanTitle from 'src/utils/cleaners/title';
|
||||
import title from 'src/utils/fetchers/title';
|
||||
|
||||
export type AxiosTitleRes = Awaited<ReturnType<typeof title>>;
|
||||
|
||||
// for full title
|
||||
type Title = ReturnType<typeof cleanTitle>;
|
||||
export type { Title as default };
|
||||
|
Reference in New Issue
Block a user