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
export default async function Speaker({ | |
params: { slug }, | |
}: { | |
params: { slug: string }; | |
}) { | |
const speakerInfo = await getSpeakerInfo(slug); | |
const { name, bio, id, sessions }: SpeakerWithSessions = speakerInfo; | |
return ( | |
<section key={id} className={styles.infoContainer}> |
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
import styles from "./conference.module.css"; | |
/** Loading skeleton for conference sessions and speakers page */ | |
export default function Loading() { | |
// You can add any UI inside Loading, including a Skeleton. | |
return ( | |
<> | |
{Array(10) | |
.fill(1) | |
.map((index) => ( |
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
.skeletonContainer { | |
display: block; | |
box-sizing: inherit; | |
margin-top: 1rem; | |
background-color: lightgray; | |
padding: 10px; | |
height: 200px; | |
} |
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
.skeletonContainer { | |
display: block; | |
box-sizing: inherit; | |
margin-top: 1rem; | |
background-color: lightgray; | |
padding: 10px; | |
height: 200px; | |
} |
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
import styles from "../conference.module.css"; | |
import { SpeakerSummary } from "../speakers/page"; | |
import { | |
fetchSpeakers, | |
getSpeakerDetails, | |
} from "../speakers/services/speakers"; | |
import { fetchSessions } from "./services/sessions"; | |
export default async function Sessions() { | |
const sessionsData = await fetchSessions(); |
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
import styles from "../conference.module.css"; | |
import { fetchSpeakers } from "./services/speakers"; | |
export type Speaker = { | |
id: string; | |
name: string; | |
bio: string; | |
featured?: 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
.parentContainer { | |
margin: 50px; | |
} | |
.infoContainer { | |
display: block; | |
box-sizing: inherit; | |
margin-top: 1rem; | |
background-color: #262630; | |
padding: 10px; |
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
import * as Keychain from 'react-native-keychain'; | |
import DeviceInfo from 'react-native-device-info' | |
async () => { | |
const username = 'adhithi'; | |
const password = 'poniesRgr8'; | |
const server = DeviceInfo.getBundleId() | |
// Store the credentials | |
await Keychain.setInternetCredentials(server, email, password).then(() => { |
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
Keychain.getInternetCredentials(server).then(credentials => { | |
if (credentials) { | |
console.log('Credentials successfully loaded for user ' + credentials.username) | |
} | |
else { | |
console.log('Could not retrieve credentials for server') | |
} | |
}).catch(error => { | |
console.log('Could not get credentials from keychain') | |
}) |
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
// using react-native-device-info to get server information | |
const server = DeviceInfo.getBundleId() | |
Keychain.setInternetCredentials(server, email, password).then(() => { | |
console.log('Saved internet credentials') | |
}).catch(error => { | |
console.log('Could not save credentials') | |
}) |
NewerOlder