Skip to content

Commit

Permalink
tabs never spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
arthtyagi committed Oct 12, 2022
1 parent 6467f9a commit c88d91f
Show file tree
Hide file tree
Showing 111 changed files with 7,911 additions and 7,842 deletions.
22 changes: 11 additions & 11 deletions .eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
module.exports = {
...require("@devclad/config/eslint-react"),
ignorePatterns: ["**/*.js", "**/*.cjs", "**/*.json", "node_modules"],
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: "latest",
sourceType: "module",
project: "tsconfig.json",
tsconfigRootDir: __dirname,
},
...require('@devclad/config/eslint-react'),
ignorePatterns: ['**/*.js', '**/*.cjs', '**/*.json', 'node_modules'],
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 'latest',
sourceType: 'module',
project: 'tsconfig.json',
tsconfigRootDir: __dirname,
},
};
8 changes: 8 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"printWidth": 100,
"useTabs": true,
"semi": true,
"singleQuote": true,
"tabWidth": 2,
"trailingComma": "es5"
}
18 changes: 8 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# DevClad - Social Workspace for Developers

![devclad](https://imagedelivery.net/nF-ES6OEyyKZDJvRdLK8oA/677a1e0a-bd95-4e85-7aa3-86287a865f00/public)

Uses [Turborepo](https://turborepo.com).

## Run in Development
Expand All @@ -11,26 +13,22 @@ Uses [Turborepo](https://turborepo.com).

> Run `pre-commit run -a` when running `pre-commit` hooks for the first time.
For instructions on how to run the server, see [server/README.md](apps/server/readme.md).

### Apps

- [app/landing](https://github.com/DevClad-Inc/devclad-client/tree/main/apps/landing)
- [app/web](https://github.com/DevClad-Inc/devclad-client/tree/main/apps/web)

---

## UI

- Using TailwindCSS for styling.

## State Management

- [`useContext`](https://reactjs.org/docs/hooks-reference.html#usecontext) + [`useReducer`](https://reactjs.org/docs/hooks-reference.html#usereducer)
- [React Query](https://react-query.tanstack.com/) to keep client state and server states in sync.
- Zustand/Jotai if needed later.
## Contributing

## Styling

Using [Airbnb Style Guide](https://github.com/airbnb/javascript) for ESLint with some modifications.
- Tabs not spaces. Tabs are 2 spaces.
- Use `prettier` for formatting.
- Using [Airbnb Style Guide](https://github.com/airbnb/javascript) for ESLint with some modifications.

## Absolute Imports

Expand Down
38 changes: 19 additions & 19 deletions apps/landing/.eslintrc.cjs
Original file line number Diff line number Diff line change
@@ -1,21 +1,21 @@
module.exports = {
...require('@devclad/config/eslint-react'),
ignorePatterns: [
'**/*.js',
'**/*.cjs',
'**/*.json',
'node_modules',
'public',
'dist',
'vite.config.ts',
],
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 'latest',
sourceType: 'module',
project: 'tsconfig.json',
tsconfigRootDir: __dirname,
},
...require('@devclad/config/eslint-react'),
ignorePatterns: [
'**/*.js',
'**/*.cjs',
'**/*.json',
'node_modules',
'public',
'dist',
'vite.config.ts',
],
parserOptions: {
ecmaFeatures: {
jsx: true,
},
ecmaVersion: 'latest',
sourceType: 'module',
project: 'tsconfig.json',
tsconfigRootDir: __dirname,
},
};
7 changes: 0 additions & 7 deletions apps/landing/.prettierrc

This file was deleted.

106 changes: 53 additions & 53 deletions apps/landing/package.json
Original file line number Diff line number Diff line change
@@ -1,55 +1,55 @@
{
"name": "landing",
"homepage": "https://www.devclad.com",
"private": true,
"version": "0.0.0",
"license": "Elastic License 2.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"preview": "vite preview"
},
"dependencies": {
"@devclad/lib": "*",
"@devclad/ui": "*",
"@headlessui/react": "^1.7.3",
"@heroicons/react": "^2.0.11",
"@tailwindcss/aspect-ratio": "^0.4.2",
"airtable": "^0.11.4",
"clsx": "^1.2.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-hot-toast": "^2.3.0",
"vite-plugin-ssr": "^0.4.40",
"vite-plugin-svgr": "^2.2.1"
},
"devDependencies": {
"@tailwindcss/forms": "^0.5.3",
"@types/node": "^18.8.1",
"@types/react": "^18.0.17",
"@types/react-dom": "^18.0.6",
"@typescript-eslint/eslint-plugin": "^5.39.0",
"@typescript-eslint/parser": "^5.39.0",
"@vitejs/plugin-react": "^2.0.1",
"eslint": "^8.24.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb-typescript": "^17.0.0",
"eslint-config-prettier": "^8.5.0",
"eslint-config-standard-with-typescript": "^23.0.0",
"eslint-config-turbo": "latest",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jsx-a11y": "^6.6.1",
"eslint-plugin-n": "^15.0.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-promise": "^6.0.0",
"eslint-plugin-react": "^7.31.8",
"eslint-plugin-react-hooks": "^4.6.0",
"postcss": "^8.4.17",
"prettier-plugin-tailwindcss": "^0.1.13",
"rollup-plugin-visualizer": "^5.8.2",
"tailwindcss": "^3.1.8",
"typescript": "^4.8.4",
"vite": "^3.1.4"
}
"name": "landing",
"homepage": "https://www.devclad.com",
"private": true,
"version": "0.0.0",
"license": "Elastic License 2.0",
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"preview": "vite preview"
},
"dependencies": {
"@devclad/lib": "*",
"@devclad/ui": "*",
"@headlessui/react": "^1.7.3",
"@heroicons/react": "^2.0.11",
"@tailwindcss/aspect-ratio": "^0.4.2",
"airtable": "^0.11.4",
"clsx": "^1.2.1",
"react": "^18.2.0",
"react-dom": "^18.2.0",
"react-hot-toast": "^2.3.0",
"vite-plugin-ssr": "^0.4.40",
"vite-plugin-svgr": "^2.2.1"
},
"devDependencies": {
"@tailwindcss/forms": "^0.5.3",
"@types/node": "^18.8.1",
"@types/react": "^18.0.17",
"@types/react-dom": "^18.0.6",
"@typescript-eslint/eslint-plugin": "^5.39.0",
"@typescript-eslint/parser": "^5.39.0",
"@vitejs/plugin-react": "^2.0.1",
"eslint": "^8.24.0",
"eslint-config-airbnb": "^19.0.4",
"eslint-config-airbnb-typescript": "^17.0.0",
"eslint-config-prettier": "^8.5.0",
"eslint-config-standard-with-typescript": "^23.0.0",
"eslint-config-turbo": "latest",
"eslint-plugin-import": "^2.26.0",
"eslint-plugin-jsx-a11y": "^6.6.1",
"eslint-plugin-n": "^15.0.0",
"eslint-plugin-prettier": "^4.2.1",
"eslint-plugin-promise": "^6.0.0",
"eslint-plugin-react": "^7.31.8",
"eslint-plugin-react-hooks": "^4.6.0",
"postcss": "^8.4.17",
"prettier-plugin-tailwindcss": "^0.1.13",
"rollup-plugin-visualizer": "^5.8.2",
"tailwindcss": "^3.1.8",
"typescript": "^4.8.4",
"vite": "^3.1.4"
}
}
2 changes: 1 addition & 1 deletion apps/landing/postcss.config.cjs
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module.exports = {
...require('@devclad/ui/postcss'),
...require('@devclad/ui/postcss'),
};
148 changes: 74 additions & 74 deletions apps/landing/src/components/CTA.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,80 +4,80 @@ import { classNames } from '@devclad/lib';
import handleForm from '../handleForm';

export default function CTA() {
const [submitted, setSubmitted] = React.useState(false);
return (
<div className="sm:justify-center lg:flex">
<div className="mt-10 sm:mt-12 xl:w-2/5" id="notify">
<form
onSubmit={(e: React.ChangeEvent<HTMLFormElement>) => {
e.preventDefault();
const email = e.currentTarget.email.value;
if (email && !submitted) {
handleForm(email);
setSubmitted(true);
} else if (!email) {
toast.error('Please enter a valid email address', {
style: {
background: '#000',
color: '#fff',
border: '1px dashed #555',
width: '100%',
fontSize: '16px',
textAlign: 'center',
},
id: 'error',
icon: '🚫',
});
} else {
toast.error('Already submitted a while ago', {
style: {
background: '#000',
color: '#fff',
border: '1px dashed #555',
width: '100%',
fontSize: '18px',
textAlign: 'center',
},
icon: '🚫',
id: 'error-multiple',
});
}
}}
className="sm:mx-auto sm:max-w-xl lg:mx-0 lg:max-w-full"
>
<div className="font-mono sm:flex">
<div className="min-w-2 flex-1">
<label htmlFor="email">
<span className="sr-only">Email address</span>
<input
id="email"
type="email"
placeholder="Enter your email"
className="block w-full rounded-md border-[1px] border-neutral-800 bg-transparent
const [submitted, setSubmitted] = React.useState(false);
return (
<div className="sm:justify-center lg:flex">
<div className="mt-10 sm:mt-12 xl:w-2/5" id="notify">
<form
onSubmit={(e: React.ChangeEvent<HTMLFormElement>) => {
e.preventDefault();
const email = e.currentTarget.email.value;
if (email && !submitted) {
handleForm(email);
setSubmitted(true);
} else if (!email) {
toast.error('Please enter a valid email address', {
style: {
background: '#000',
color: '#fff',
border: '1px dashed #555',
width: '100%',
fontSize: '16px',
textAlign: 'center',
},
id: 'error',
icon: '🚫',
});
} else {
toast.error('Already submitted a while ago', {
style: {
background: '#000',
color: '#fff',
border: '1px dashed #555',
width: '100%',
fontSize: '18px',
textAlign: 'center',
},
icon: '🚫',
id: 'error-multiple',
});
}
}}
className="sm:mx-auto sm:max-w-xl lg:mx-0 lg:max-w-full"
>
<div className="font-mono sm:flex">
<div className="min-w-2 flex-1">
<label htmlFor="email">
<span className="sr-only">Email address</span>
<input
id="email"
type="email"
placeholder="Enter your email"
className="block w-full rounded-md border-[1px] border-neutral-800 bg-transparent
px-4 py-3 text-base text-white placeholder-white focus:outline-none
focus:ring-2 focus:ring-neutral-500 focus:ring-offset-2 focus:ring-offset-neutral-900"
/>
</label>
</div>
<div className="mt-3 animate-dropglowSM rounded-sm sm:mt-0 sm:ml-3">
<button
type="submit"
className={classNames(
submitted
? 'border-[1px] border-honeyDew text-white hover:border-phthaloGreen focus:ring-neutral-300 focus:ring-offset-2'
: 'border-[1px] border-neutral-600 bg-black text-white duration-1000 hover:border-neutral-400',
'block w-full rounded-md py-3 px-3 font-medium duration-500 focus:outline-none focus:ring-2 focus:ring-offset-neutral-900'
)}
>
{submitted ? 'Added to waitlist' : 'Get Notified'}
</button>
</div>
</div>
<p className="mt-5 text-center font-mono text-sm text-orange-100 sm:p-3 lg:p-2">
50% off any future plans for the first 1000 users.
</p>
</form>
</div>
</div>
);
/>
</label>
</div>
<div className="animate-dropglowSM mt-3 rounded-sm sm:mt-0 sm:ml-3">
<button
type="submit"
className={classNames(
submitted
? 'border-honeyDew hover:border-phthaloGreen border-[1px] text-white focus:ring-neutral-300 focus:ring-offset-2'
: 'border-[1px] border-neutral-600 bg-black text-white duration-1000 hover:border-neutral-400',
'block w-full rounded-md py-3 px-3 font-medium duration-500 focus:outline-none focus:ring-2 focus:ring-offset-neutral-900'
)}
>
{submitted ? 'Added to waitlist' : 'Get Notified'}
</button>
</div>
</div>
<p className="mt-5 text-center font-mono text-sm text-orange-100 sm:p-3 lg:p-2">
50% off any future plans for the first 1000 users.
</p>
</form>
</div>
</div>
);
}
Loading

0 comments on commit c88d91f

Please sign in to comment.