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 RegularButton from "../button/regular.button"; | |
import UsersTable from "../tables/usersTable"; | |
import { useModal } from "../../context/modal.context"; | |
import UserSearchBar from "./userSearchBar"; | |
export default function UserTableContainer() { | |
const { toggleVisible } = useModal(); | |
const openModal = () => { |
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 Head from "next/head"; | |
import MainLayout from "../src/components/layout/mainLayout"; | |
import Footer from "../src/components/layout/footer"; | |
import UserTableContainer from "../src/components/containers/usertableContainer"; | |
export default function Home() { | |
return ( | |
<div> | |
<Head> | |
<title>Task</title> |
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 const submitter = ( | |
endpoint, | |
{ fileName, committer, content, lang, contentType, branch = '' }, | |
) => { | |
const dataToSend = { | |
fileToUpdate: `${fileName}.${contentType}`, | |
committer, | |
content, | |
lang, | |
contentType, |
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
/* eslint-disable */ | |
import { Octokit } from '@octokit/rest'; | |
import { popupMessages } from '../../constants/popup-messages.constants'; | |
import { popupVariants } from '../../constants/popup.constants'; | |
import { getUserNameFromEmail } from '../../helpers/string.helpers'; | |
import { | |
GithubOrganization, | |
successStatusCodes, | |
} from './constants/github.constants'; |
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
/* eslint-disable */ | |
import path from 'path'; | |
import { Languages } from '../../constants'; | |
import { popupMessages } from '../../constants/popup-messages.constants'; | |
import { popupVariants } from '../../constants/popup.constants'; | |
import { getUserNameFromEmail } from '../../helpers/string.helpers'; | |
import { octokit } from '../../services/admin.services'; | |
import { GithubOrganization } from './constants/github.constants'; |
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 { Octokit } from '@octokit/rest'; | |
export const octokit = new Octokit({ | |
auth: process.env.NEXT_PUBLIC_GITHUB_TOKEN, | |
}); | |
export const octokitResponse = async (responseUrl, dataToSend) => { | |
const responseData = await fetch(responseUrl, { | |
body: JSON.stringify(dataToSend), | |
method: 'POST', |
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 matter from 'gray-matter'; | |
import path from 'path'; | |
import fs from 'fs'; | |
export default function getDocBySlug(slug, locale = 'us') { | |
const docsDirectory = path.join(process.cwd(), '/src/content'); | |
const realSlug = slug.replace(/\.mdx$/, ''); | |
const fullPath = path.join(docsDirectory, slug, `${realSlug}.${locale}.mdx`); | |
const fileContents = fs.readFileSync(fullPath, 'utf8'); | |
const { content, data } = matter(fileContents); |
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 { MDXRemote } from 'next-mdx-remote'; | |
import getDocBySlug from '../src/services/getDocBySlug.mjs'; | |
import Image from 'next/image'; | |
import { serialize } from 'next-mdx-remote/serialize'; | |
export default function Blog({ content, meta }) { | |
const components = { | |
Image, | |
}; |
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 React from 'react'; | |
import Link from 'next/link'; | |
import { useRouter } from 'next/dist/client/router'; | |
export default function Test() { | |
const { locales, asPath } = useRouter(); | |
return ( | |
<div> | |
{locales.map((localeName) => { | |
return ( |
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
module.exports = { | |
i18n: { | |
locales: ['us', 'am'], | |
defaultLocale: 'us', | |
}, | |
}; |
NewerOlder