Remove classnames, plopfile, json-server
This commit is contained in:
@@ -1,102 +0,0 @@
|
||||
{
|
||||
"events": [
|
||||
{
|
||||
"id": 1,
|
||||
"tags": [],
|
||||
"visible": false,
|
||||
"title": "BaseFeedBaseFeed",
|
||||
"description": "wdnvsflgbkeancQN",
|
||||
"content": "dsfjoisDHNDAH",
|
||||
"start_time": "2018-07-10T18:46:55.924259Z",
|
||||
"end_time": "2018-07-10T18:46:55.924296Z",
|
||||
"signup_id": [],
|
||||
"signupForm": []
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"tags": [],
|
||||
"visible": false,
|
||||
"title": "test",
|
||||
"description": "wdnvsflgbkeancQN",
|
||||
"content": "kciofdconcosnc",
|
||||
"start_time": "2018-07-10T18:57:34.329387Z",
|
||||
"end_time": "2018-07-10T18:57:34.329439Z",
|
||||
"signup_id": [
|
||||
1,
|
||||
2,
|
||||
3
|
||||
],
|
||||
"signupForm": [
|
||||
{
|
||||
"id": 1,
|
||||
"start": "2018-07-10T18:16:21.285307Z",
|
||||
"end": "2018-07-10T18:16:21.285340Z",
|
||||
"questions": "json"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"start": "2018-07-10T18:16:35.804521Z",
|
||||
"end": "2018-07-10T18:16:35.804550Z",
|
||||
"questions": "JSON"
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"start": "2019-02-11T22:12:00Z",
|
||||
"end": "2018-12-11T22:12:00Z",
|
||||
"questions": "JSON"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": 4,
|
||||
"tags": [],
|
||||
"visible": false,
|
||||
"title": "Illanvika",
|
||||
"description": "ahiuhqiuw",
|
||||
"content": "nbiufhiusaiuwad",
|
||||
"start_time": "2018-07-10T18:58:00.516316Z",
|
||||
"end_time": "2018-07-10T18:58:00.516346Z",
|
||||
"signup_id": [
|
||||
],
|
||||
"signupForm": [
|
||||
]
|
||||
}
|
||||
],
|
||||
"SignupForm": [
|
||||
{
|
||||
"id": 1,
|
||||
"start": "2018-07-10T18:16:21.285307Z",
|
||||
"end": "2018-07-10T18:16:21.285340Z",
|
||||
"questions": "json"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"start": "2018-07-10T18:16:35.804521Z",
|
||||
"end": "2018-07-10T18:16:35.804550Z",
|
||||
"questions": "JSON"
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"start": "2019-02-11T22:12:00Z",
|
||||
"end": "2018-12-11T22:12:00Z",
|
||||
"questions": "JSON"
|
||||
}
|
||||
],
|
||||
"SignUp": [
|
||||
{
|
||||
"id": 1,
|
||||
"signupForm": 1,
|
||||
"answer": "JSON1"
|
||||
},
|
||||
{
|
||||
"id": 2,
|
||||
"signupForm": 2,
|
||||
"answer": "JSON3"
|
||||
},
|
||||
{
|
||||
"id": 3,
|
||||
"signupForm": 2,
|
||||
"answer": "JSON4234"
|
||||
}
|
||||
]
|
||||
}
|
||||
Generated
+12
-1322
File diff suppressed because it is too large
Load Diff
+1
-6
@@ -31,13 +31,11 @@
|
||||
"start-dev": "webpack-dev-server --config=configs/webpack/dev.js",
|
||||
"serve": "node dist/js/server.js",
|
||||
"start-prod": "npm run build && npm run serve",
|
||||
"mock-backend": "json-server --watch db.json -H 0.0.0.0 -p 1234",
|
||||
"test": "npm run test:e2e:verbose",
|
||||
"test:e2e": "npm-run-all -p -r serve test:e2e:testcafe",
|
||||
"test:e2e:verbose": "npm-run-all -p -r serve test:e2e:testcafe:verbose",
|
||||
"test:e2e:testcafe": "testcafe -S -s 'tests/testcafe/screenshots' --app-init-delay 2000 chrome:headless tests/testcafe",
|
||||
"test:e2e:testcafe:verbose": "testcafe -S -s 'tests/testcafe/screenshots' --app-init-delay 2000 chrome tests/testcafe",
|
||||
"plop": "plop"
|
||||
"test:e2e:testcafe:verbose": "testcafe -S -s 'tests/testcafe/screenshots' --app-init-delay 2000 chrome tests/testcafe"
|
||||
},
|
||||
"husky": {
|
||||
"hooks": {
|
||||
@@ -45,7 +43,6 @@
|
||||
}
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/classnames": "2.2.10",
|
||||
"@types/jest": "24.0.22",
|
||||
"@types/js-cookie": "2.2.4",
|
||||
"@types/node": "10.14.7",
|
||||
@@ -84,7 +81,6 @@
|
||||
"html-webpack-plugin": "3.2.0",
|
||||
"husky": "1.3.1",
|
||||
"image-webpack-loader": "6.0.0",
|
||||
"json-server": "0.16.1",
|
||||
"mini-css-extract-plugin": "0.4.5",
|
||||
"module-to-cdn": "3.1.2",
|
||||
"morgan": "1.9.1",
|
||||
@@ -120,7 +116,6 @@
|
||||
},
|
||||
"dependencies": {
|
||||
"axios": "0.19.0",
|
||||
"classnames": "2.2.6",
|
||||
"date-fns": "2.0.0-alpha.27",
|
||||
"js-cookie": "2.2.0",
|
||||
"lodash": "4.17.20",
|
||||
|
||||
-110
@@ -1,110 +0,0 @@
|
||||
module.exports = function(plop) {
|
||||
plop.setGenerator("New component", {
|
||||
description: "Create a new TSX + SCSS component for React.",
|
||||
prompts: [
|
||||
{
|
||||
type: "input",
|
||||
name: "name",
|
||||
message: "Component name:"
|
||||
},
|
||||
{
|
||||
type: "list",
|
||||
choices: [{ name: "No, it does not observe a store", value: false }, { name: "Yes, it observes a store", value: true }],
|
||||
name: "observer",
|
||||
message: "Is the component a MobX observer?"
|
||||
},
|
||||
{
|
||||
type: "input",
|
||||
name: "store_name",
|
||||
message: "MobX store name:",
|
||||
when: answers => answers.observer
|
||||
},
|
||||
],
|
||||
actions: [
|
||||
{
|
||||
type: "add",
|
||||
path: "src/components/{{ properCase name }}/{{ properCase name }}.tsx",
|
||||
templateFile: "plop-templates/component.tsx",
|
||||
abortOnFail: true
|
||||
},
|
||||
{
|
||||
type: "add",
|
||||
path: "src/components/{{ properCase name }}/{{ properCase name }}.scss",
|
||||
templateFile: "plop-templates/component.scss",
|
||||
abortOnFail: true
|
||||
},
|
||||
{
|
||||
type: "add",
|
||||
path: "src/components/{{ properCase name }}/index.ts",
|
||||
templateFile: "plop-templates/index.ts",
|
||||
abortOnFail: true
|
||||
}
|
||||
]
|
||||
});
|
||||
plop.setGenerator("New page", {
|
||||
description: "Create a new TSX + SCSS page for React.",
|
||||
prompts: [
|
||||
{
|
||||
type: "input",
|
||||
name: "name",
|
||||
message: "Page name (has to end in \"page\"):"
|
||||
},
|
||||
],
|
||||
actions: [
|
||||
{
|
||||
type: "add",
|
||||
path: "src/pages/{{ properCase name }}/{{ properCase name }}.tsx",
|
||||
templateFile: "plop-templates/page.tsx",
|
||||
abortOnFail: true
|
||||
},
|
||||
{
|
||||
type: "add",
|
||||
path: "src/pages/{{ properCase name }}/{{ properCase name }}.scss",
|
||||
templateFile: "plop-templates/page.scss",
|
||||
abortOnFail: true
|
||||
},
|
||||
{
|
||||
type: "add",
|
||||
path: "src/pages/{{ properCase name }}/index.ts",
|
||||
templateFile: "plop-templates/index.ts",
|
||||
abortOnFail: true
|
||||
}
|
||||
]
|
||||
});
|
||||
plop.setGenerator("New MobX state store", {
|
||||
description: "Create a new store for MobX.",
|
||||
prompts: [
|
||||
{
|
||||
type: "input",
|
||||
name: "name",
|
||||
message: "Store name:"
|
||||
}
|
||||
],
|
||||
actions: [
|
||||
{
|
||||
type: "add",
|
||||
path: "src/stores/{{ properCase name }}.ts",
|
||||
templateFile: "plop-templates/store.ts",
|
||||
abortOnFail: true
|
||||
}
|
||||
]
|
||||
});
|
||||
plop.setGenerator("New API model", {
|
||||
description: "Create a new API model for backend communication.",
|
||||
prompts: [
|
||||
{
|
||||
type: "input",
|
||||
name: "name",
|
||||
message: "Model name:"
|
||||
}
|
||||
],
|
||||
actions: [
|
||||
{
|
||||
type: "add",
|
||||
path: "src/models/{{ properCase name }}.ts",
|
||||
templateFile: "plop-templates/model.ts",
|
||||
abortOnFail: true
|
||||
}
|
||||
]
|
||||
});
|
||||
};
|
||||
@@ -1,7 +1,7 @@
|
||||
import React from "react";
|
||||
import styled from "styled-components";
|
||||
import TextAnchor from "./TextAnchor";
|
||||
import { colors } from "@theme/colors";
|
||||
import Anchor from "@components/Anchor";
|
||||
|
||||
interface PageLinkProps {
|
||||
to: string;
|
||||
@@ -43,7 +43,7 @@ const StyledPageLink = styled.div`
|
||||
const PageLink: React.FC<PageLinkProps> = ({ to, desc, children }) => (
|
||||
<StyledPageLink>
|
||||
<p>{children}</p>
|
||||
<TextAnchor to={to}>{desc}</TextAnchor>
|
||||
<Anchor to={to}>{desc}</Anchor>
|
||||
</StyledPageLink>
|
||||
);
|
||||
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
import React from "react";
|
||||
import styled from "styled-components";
|
||||
import { Colors, colorToClass, hoverColorToClass } from "@theme/colors";
|
||||
import Anchor from "./Anchor";
|
||||
import classNames from "classnames";
|
||||
|
||||
const A = styled(Anchor)`
|
||||
text-decoration: underline;
|
||||
font-weight: 600;
|
||||
`;
|
||||
|
||||
interface TextAnchorProps {
|
||||
to: string;
|
||||
textColor?: Colors;
|
||||
hoverColor?: Colors;
|
||||
}
|
||||
|
||||
const TextAnchor: React.FC<TextAnchorProps> = ({ children, to, textColor, hoverColor }) => {
|
||||
const classes = classNames(
|
||||
colorToClass(textColor),
|
||||
hoverColorToClass(hoverColor),
|
||||
)
|
||||
return (
|
||||
<A to={to} className={classes}>
|
||||
{children}
|
||||
</A>
|
||||
);
|
||||
}
|
||||
|
||||
export default TextAnchor;
|
||||
@@ -1,7 +1,6 @@
|
||||
export { default as Card } from "./Card";
|
||||
export { default as PageLink } from "./PageLink";
|
||||
export { default as Button } from "./Button";
|
||||
export { default as TextAnchor } from "./TextAnchor";
|
||||
export { default as Divider } from "./Divider";
|
||||
export { default as CardSection } from "./Sections/CardSection";
|
||||
export { default as CTASection } from "./Sections/CTASection";
|
||||
|
||||
@@ -1,14 +1,23 @@
|
||||
import React from "react";
|
||||
import styled from "styled-components";
|
||||
import { Occupation, Committee } from "@models/Contacts";
|
||||
import CommitteeContainer from "@components/CommitteeContainer";
|
||||
import TextAnchor from "@components/TextAnchor";
|
||||
import { Divider, TextSection } from "@components/index";
|
||||
import { colors } from "@theme/colors";
|
||||
import Anchor from "@components/Anchor";
|
||||
|
||||
interface ContactsPageViewProps {
|
||||
contacts: Occupation[];
|
||||
committees: Committee[];
|
||||
}
|
||||
|
||||
const BlueLink = styled(Anchor)`
|
||||
color: ${colors.blue1};
|
||||
|
||||
&:hover {
|
||||
color: ${colors.lightBlue};
|
||||
}
|
||||
`;
|
||||
|
||||
|
||||
class ContactsPageView extends React.Component<ContactsPageViewProps> {
|
||||
@@ -29,12 +38,9 @@ class ContactsPageView extends React.Component<ContactsPageViewProps> {
|
||||
<CommitteeContainer name_fi="Hallitus" name_en="Board" contacts={board} />
|
||||
<p>
|
||||
{"Hallitukseen saa yhteyden lähettämällä sähköpostia "}
|
||||
<TextAnchor
|
||||
textColor="blue1"
|
||||
hoverColor="light-blue"
|
||||
to="mailto:sik-hallitus@list.ayy.fi">
|
||||
<BlueLink to="mailto:sik-hallitus@list.ayy.fi">
|
||||
sik-hallitus@list.ayy.fi
|
||||
</TextAnchor>
|
||||
</BlueLink>
|
||||
</p>
|
||||
</div>
|
||||
</TextSection>
|
||||
|
||||
Reference in New Issue
Block a user