Skip to content

Commit b588910

Browse files
committed
Update
1 parent 4c58ceb commit b588910

File tree

5 files changed

+66
-61
lines changed

5 files changed

+66
-61
lines changed

dist/index.es.js

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -100,17 +100,17 @@ const Button = props => {
100100
})));
101101
};
102102

103-
const Footer = () => {
104-
const linkedin = process.env.REACT_APP_SOCIAL_LINKEDIN;
105-
const facebook = process.env.REACT_APP_SOCIAL_FACEBOOK;
106-
const github = process.env.REACT_APP_SOCIAL_GITHUB;
107-
const instagram = process.env.REACT_APP_SOCIAL_INSTAGRAM;
108-
const socialMedia = {
109-
linkedin,
110-
github,
111-
facebook,
112-
instagram
113-
};
103+
/* This code defines a functional React component called `Footer`. The component takes in an object as
104+
its argument with properties `linkedin`, `github`, `facebook`, and `instagram`, which are set to
105+
default values retrieved from environment variables (`process.env.REACT_APP_SOCIAL_LINKEDIN`,
106+
`process.env.REACT_APP_SOCIAL_GITHUB`, `process.env.REACT_APP_SOCIAL_FACEBOOK`,
107+
`process.env.REACT_APP_SOCIAL_INSTAGRAM`). */
108+
const Footer = ({
109+
linkedin = process.env.REACT_APP_SOCIAL_LINKEDIN,
110+
github = process.env.REACT_APP_SOCIAL_GITHUB,
111+
facebook = process.env.REACT_APP_SOCIAL_FACEBOOK,
112+
instagram = process.env.REACT_APP_SOCIAL_INSTAGRAM
113+
}) => {
114114
return /*#__PURE__*/React.createElement("footer", null, /*#__PURE__*/React.createElement("div", {
115115
className: "footer color--white"
116116
}, /*#__PURE__*/React.createElement("span", {
@@ -123,27 +123,27 @@ const Footer = () => {
123123
href: "mailto: [email protected]"
124124
}, "[email protected]")), /*#__PURE__*/React.createElement("div", {
125125
className: "btn-social-desk"
126-
}, socialMedia?.linkedin && /*#__PURE__*/React.createElement("a", {
126+
}, linkedin && /*#__PURE__*/React.createElement("a", {
127127
className: "btn-social color--white ",
128-
href: socialMedia.linkedin,
128+
href: linkedin,
129129
target: "blank"
130130
}, /*#__PURE__*/React.createElement("i", {
131131
className: "fab fa-linkedin"
132-
})), socialMedia?.github && /*#__PURE__*/React.createElement("a", {
132+
})), github && /*#__PURE__*/React.createElement("a", {
133133
className: "btn-social color--white ms--1",
134-
href: socialMedia.github,
134+
href: github,
135135
target: "blank"
136136
}, /*#__PURE__*/React.createElement("i", {
137137
className: "fab fa-github"
138-
})), socialMedia?.facebook && /*#__PURE__*/React.createElement("a", {
138+
})), facebook && /*#__PURE__*/React.createElement("a", {
139139
className: "btn-social color--white ms--1",
140-
href: socialMedia.facebook,
140+
href: facebook,
141141
target: "blank"
142142
}, /*#__PURE__*/React.createElement("i", {
143143
className: "fab fa-facebook-square"
144-
})), socialMedia?.instagram && /*#__PURE__*/React.createElement("a", {
144+
})), instagram && /*#__PURE__*/React.createElement("a", {
145145
className: "btn-social color--white ms--1",
146-
href: socialMedia.instagram,
146+
href: instagram,
147147
target: "blank"
148148
}, /*#__PURE__*/React.createElement("i", {
149149
className: "fab fa-instagram"
@@ -165,7 +165,7 @@ const Footer = () => {
165165
className: "color--primary"
166166
}, "ran"), /*#__PURE__*/React.createElement("span", {
167167
className: "color--secondary"
168-
}, "dev"))), /*#__PURE__*/React.createElement("br", null), "\xA92023 - Random Development")));
168+
}, "dev"))), /*#__PURE__*/React.createElement("br", null), "\xA92024 - Random Development")));
169169
};
170170

171171
const Modal = props => {

dist/index.js

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -102,17 +102,17 @@ const Button = props => {
102102
})));
103103
};
104104

105-
const Footer = () => {
106-
const linkedin = process.env.REACT_APP_SOCIAL_LINKEDIN;
107-
const facebook = process.env.REACT_APP_SOCIAL_FACEBOOK;
108-
const github = process.env.REACT_APP_SOCIAL_GITHUB;
109-
const instagram = process.env.REACT_APP_SOCIAL_INSTAGRAM;
110-
const socialMedia = {
111-
linkedin,
112-
github,
113-
facebook,
114-
instagram
115-
};
105+
/* This code defines a functional React component called `Footer`. The component takes in an object as
106+
its argument with properties `linkedin`, `github`, `facebook`, and `instagram`, which are set to
107+
default values retrieved from environment variables (`process.env.REACT_APP_SOCIAL_LINKEDIN`,
108+
`process.env.REACT_APP_SOCIAL_GITHUB`, `process.env.REACT_APP_SOCIAL_FACEBOOK`,
109+
`process.env.REACT_APP_SOCIAL_INSTAGRAM`). */
110+
const Footer = ({
111+
linkedin = process.env.REACT_APP_SOCIAL_LINKEDIN,
112+
github = process.env.REACT_APP_SOCIAL_GITHUB,
113+
facebook = process.env.REACT_APP_SOCIAL_FACEBOOK,
114+
instagram = process.env.REACT_APP_SOCIAL_INSTAGRAM
115+
}) => {
116116
return /*#__PURE__*/React.createElement("footer", null, /*#__PURE__*/React.createElement("div", {
117117
className: "footer color--white"
118118
}, /*#__PURE__*/React.createElement("span", {
@@ -125,27 +125,27 @@ const Footer = () => {
125125
href: "mailto: [email protected]"
126126
}, "[email protected]")), /*#__PURE__*/React.createElement("div", {
127127
className: "btn-social-desk"
128-
}, socialMedia?.linkedin && /*#__PURE__*/React.createElement("a", {
128+
}, linkedin && /*#__PURE__*/React.createElement("a", {
129129
className: "btn-social color--white ",
130-
href: socialMedia.linkedin,
130+
href: linkedin,
131131
target: "blank"
132132
}, /*#__PURE__*/React.createElement("i", {
133133
className: "fab fa-linkedin"
134-
})), socialMedia?.github && /*#__PURE__*/React.createElement("a", {
134+
})), github && /*#__PURE__*/React.createElement("a", {
135135
className: "btn-social color--white ms--1",
136-
href: socialMedia.github,
136+
href: github,
137137
target: "blank"
138138
}, /*#__PURE__*/React.createElement("i", {
139139
className: "fab fa-github"
140-
})), socialMedia?.facebook && /*#__PURE__*/React.createElement("a", {
140+
})), facebook && /*#__PURE__*/React.createElement("a", {
141141
className: "btn-social color--white ms--1",
142-
href: socialMedia.facebook,
142+
href: facebook,
143143
target: "blank"
144144
}, /*#__PURE__*/React.createElement("i", {
145145
className: "fab fa-facebook-square"
146-
})), socialMedia?.instagram && /*#__PURE__*/React.createElement("a", {
146+
})), instagram && /*#__PURE__*/React.createElement("a", {
147147
className: "btn-social color--white ms--1",
148-
href: socialMedia.instagram,
148+
href: instagram,
149149
target: "blank"
150150
}, /*#__PURE__*/React.createElement("i", {
151151
className: "fab fa-instagram"
@@ -167,7 +167,7 @@ const Footer = () => {
167167
className: "color--primary"
168168
}, "ran"), /*#__PURE__*/React.createElement("span", {
169169
className: "color--secondary"
170-
}, "dev"))), /*#__PURE__*/React.createElement("br", null), "\xA92023 - Random Development")));
170+
}, "dev"))), /*#__PURE__*/React.createElement("br", null), "\xA92024 - Random Development")));
171171
};
172172

173173
const Modal = props => {

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "random-style",
3-
"version": "0.1.0",
3+
"version": "0.1.1",
44
"description": "Stylesheet && React components",
55
"main": "dist/index.js",
66
"module": "dist/index.es.js",

src/components/Button.jsx

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
import React from 'react'
22

3+
/**
4+
* The `TooltipIconLabel` component in JavaScript React displays an icon with a tooltip and a label.
5+
* @returns The `TooltipIconLabel` component is being returned. It consists of a paragraph (`<p>`)
6+
* element containing a tooltip with an icon, tooltip text, and a label.
7+
*/
38
export const TooltipIconLabel = ({ icon, tooltipText, label }) => {
49
return (
510
<p>

src/components/Footer.jsx

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
import React from 'react'
22

3-
const Footer = () => {
4-
const linkedin = process.env.REACT_APP_SOCIAL_LINKEDIN
5-
const facebook = process.env.REACT_APP_SOCIAL_FACEBOOK
6-
const github = process.env.REACT_APP_SOCIAL_GITHUB
7-
const instagram = process.env.REACT_APP_SOCIAL_INSTAGRAM
8-
const socialMedia = {
9-
linkedin,
10-
github,
11-
facebook,
12-
instagram
13-
}
3+
/* This code defines a functional React component called `Footer`. The component takes in an object as
4+
its argument with properties `linkedin`, `github`, `facebook`, and `instagram`, which are set to
5+
default values retrieved from environment variables (`process.env.REACT_APP_SOCIAL_LINKEDIN`,
6+
`process.env.REACT_APP_SOCIAL_GITHUB`, `process.env.REACT_APP_SOCIAL_FACEBOOK`,
7+
`process.env.REACT_APP_SOCIAL_INSTAGRAM`). */
8+
const Footer = ({
9+
linkedin = process.env.REACT_APP_SOCIAL_LINKEDIN,
10+
github = process.env.REACT_APP_SOCIAL_GITHUB,
11+
facebook = process.env.REACT_APP_SOCIAL_FACEBOOK,
12+
instagram = process.env.REACT_APP_SOCIAL_INSTAGRAM
13+
}) => {
1414
return (
1515
<footer>
1616
<div className="footer color--white">
@@ -20,26 +20,26 @@ const Footer = () => {
2020

2121
<div className="btn-social-desk">
2222
{
23-
socialMedia?.linkedin &&
24-
<a className="btn-social color--white " href={socialMedia.linkedin} target="blank">
23+
linkedin &&
24+
<a className="btn-social color--white " href={linkedin} target="blank">
2525
<i className="fab fa-linkedin" />
2626
</a>
2727
}
2828
{
29-
socialMedia?.github &&
30-
<a className="btn-social color--white ms--1" href={socialMedia.github} target="blank">
29+
github &&
30+
<a className="btn-social color--white ms--1" href={github} target="blank">
3131
<i className="fab fa-github" />
3232
</a>
3333
}
3434
{
35-
socialMedia?.facebook &&
36-
<a className="btn-social color--white ms--1" href={socialMedia.facebook} target="blank">
35+
facebook &&
36+
<a className="btn-social color--white ms--1" href={facebook} target="blank">
3737
<i className="fab fa-facebook-square" />
3838
</a>
3939
}
4040
{
41-
socialMedia?.instagram &&
42-
<a className="btn-social color--white ms--1" href={socialMedia.instagram} target="blank">
41+
instagram &&
42+
<a className="btn-social color--white ms--1" href={instagram} target="blank">
4343
<i className="fab fa-instagram" />
4444
</a>
4545
}
@@ -56,7 +56,7 @@ const Footer = () => {
5656
</span>
5757
</a>
5858
<br />
59-
&copy;2023 - Random Development
59+
&copy;2024 - Random Development
6060
</p>
6161
</div>
6262
</footer>

0 commit comments

Comments
 (0)