mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 14:38:45 +00:00
Feature/tinder (#179)
* basic framework for match/tinder * working version of swiping * working version of profile editing * introducing backend * working matching system * working profile updating * fix all linting issues * updated events to Enum * working profile generation * documentation updates * general PR feedback * working profile loading, matches show matchedAt * slight modification to event strings * added sql imports
This commit is contained in:
46 files changed
+1932
-49
No files matched your search
@@ -0,0 +1,16 @@
|
||||
import { useRecoilState, useRecoilValue } from 'recoil';
|
||||
import { matchState } from './state';
|
||||
|
||||
import { FormattedProfile } from '../../../../../typings/match';
|
||||
|
||||
interface IUseProfiles {
|
||||
profile: FormattedProfile;
|
||||
setProfile: (profile: FormattedProfile) => void;
|
||||
noProfileExists: boolean;
|
||||
}
|
||||
|
||||
export const useProfile = (): IUseProfiles => {
|
||||
const [profile, setProfile] = useRecoilState<FormattedProfile>(matchState.myProfile);
|
||||
const noProfileExists = useRecoilValue(matchState.noProfileExists);
|
||||
return { profile, setProfile, noProfileExists };
|
||||
};
|
||||
Reference in new issue
Block a user