-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
813f2d3
commit 678a27c
Showing
72 changed files
with
840 additions
and
492 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
import { ProfilePage } from '@/views/ProfilePage'; | ||
import { Metadata } from 'next'; | ||
import { FC } from 'react'; | ||
|
||
export const metadata: Metadata = { | ||
title: 'Melior Gift - Профиль', | ||
}; | ||
|
||
export interface ProfilePageProps { | ||
params: { profile: string }; | ||
} | ||
|
||
const Profile: FC<ProfilePageProps> = ({ params }) => { | ||
return <ProfilePage params={params} />; | ||
}; | ||
|
||
export default Profile; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
import { Card } from '@nextui-org/react'; | ||
import { | ||
MarketType, | ||
MarketsProductData, | ||
ProductDataProps, | ||
} from './model/types/product'; | ||
import { CardWide } from './ui/CardWide/CardWide'; | ||
import { Cards, CardsProps } from './ui/Cards/Cards'; | ||
|
||
export { Card, CardWide, Cards }; | ||
|
||
export type { CardsProps, MarketType, MarketsProductData, ProductDataProps }; |
2 changes: 1 addition & 1 deletion
2
src/shared/types/product.ts → src/entities/Product/model/types/product.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
2 changes: 1 addition & 1 deletion
2
src/shared/ui/Card/ui/Card/Card.tsx → src/entities/Product/ui/Card/Card.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
import { profileActions, profileReducer } from './model/slice/profileSlice'; | ||
import { | ||
ConfidentialityProfile, | ||
Profile, | ||
ProfileState, | ||
} from './model/types/profile'; | ||
import { | ||
GameBusiness, | ||
GameConfidentialityProfile, | ||
GameProfile, | ||
GameProfileState, | ||
} from './model/types/profileGame'; | ||
|
||
export { profileActions, profileReducer }; | ||
|
||
export type { | ||
ConfidentialityProfile, | ||
GameBusiness, | ||
GameConfidentialityProfile, | ||
GameProfile, | ||
GameProfileState, | ||
Profile, | ||
ProfileState, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
import { createSlice } from '@reduxjs/toolkit'; | ||
import { ProfileState } from '../types/profile'; | ||
|
||
export const profileInitialState: ProfileState = { | ||
readonly: true, | ||
isLoading: false, | ||
error: undefined, | ||
data: undefined, | ||
}; | ||
|
||
export const profileSlice = createSlice({ | ||
name: 'profile', | ||
initialState: profileInitialState, | ||
reducers: {}, | ||
}); | ||
|
||
export const { actions: profileActions } = profileSlice; | ||
export const { reducer: profileReducer } = profileSlice; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,37 @@ | ||
import { Country, Currency } from '@/shared/types/localization'; | ||
|
||
export type Gender = 'male' | 'female'; | ||
export type Status = 'online' | 'offline' | 'busy' | 'invisible' | 'away'; | ||
export type ConfidentialityParams = 'private' | 'public' | 'friend'; | ||
|
||
export interface Profile { | ||
id: number; | ||
private: boolean; | ||
email: string; | ||
phone: string; | ||
first: string; | ||
last: string; | ||
age: number; | ||
currency: Currency; | ||
country: Country; | ||
city: string; | ||
username: string; | ||
avatar: string; | ||
sex: Gender; | ||
status: Status; | ||
favorites: number[]; | ||
history: number[]; | ||
confidentiality?: ConfidentialityProfile; | ||
gameId?: number; | ||
} | ||
|
||
export interface ConfidentialityProfile { | ||
all: ConfidentialityParams; | ||
} | ||
|
||
export interface ProfileState { | ||
data?: Profile; | ||
isLoading: boolean; | ||
error?: string; | ||
readonly: boolean; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
import { ConfidentialityParams } from './profile'; | ||
|
||
export interface GameProfile { | ||
id: number; | ||
cash: number; | ||
casinoWin: number; | ||
casinoLoss: number; | ||
businessId: number; | ||
confidentiality?: GameConfidentialityProfile; | ||
} | ||
|
||
export interface GameBusiness { | ||
id: number; | ||
name: string; | ||
description: string; | ||
income: number; | ||
image: string; | ||
} | ||
|
||
export interface GameConfidentialityProfile { | ||
all: ConfidentialityParams; | ||
} | ||
|
||
export interface GameProfileState { | ||
data?: GameProfile; | ||
isLoading: boolean; | ||
error?: string; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.