Giter VIP home page Giter VIP logo

adrianhajdin / project_professional_portfolio Goto Github PK

View Code? Open in Web Editor NEW
2.0K 20.0 493.0 6.32 MB

This is a code repository for the corresponding YouTube video. In this tutorial we are going to build and deploy a real time chat application. Covered topics: React.js, SCSS, Framer Motion, Sanity

Home Page: https://jsmastery.pro

JavaScript 55.91% HTML 3.47% SCSS 39.77% CSS 0.85%
reactjs sanity-io framer-motion

project_professional_portfolio's Introduction

Micael - The Ultimate Web Development Portfolio

Micael

Introduction

This is a code repository for the corresponding video tutorial.

Do you know the best way to show your skills to employers or potential clients? Stand out from the crowd by presenting a well-digitalized flexible portfolio and get your dream job.

Stay up to date with new projects

New major projects coming soon, subscribe to the mailing list to stay up to date https://resource.jsmasterypro.com/newsletter

project_professional_portfolio's People

Contributors

adrianhajdin avatar mandeepsinghmar avatar tidbitsjs avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

project_professional_portfolio's Issues

Contact Form

I noticed that empty form could be submitted. Is there any way to add recaptcha? Example would be very useful! :)

Sanity Experiences

Hello,
a bug exist with sanity and the Experiences collection :
If you add 2 different pro experiences with 2 different year but, if they have the same name (when you add item) the tooltip in front give the same description for all experinces who have same name (developper full stack, front , ect ect )
image
image

Can you help me with Navigation dots

Can you help me with the Navigation dots of the testimonial section if I click it on your site it is not being redirected to it. And it does not stay in its colour even if we go near it?
How should I fix it help me

'activeFilter' is not defined

I have followed the steps of the video but still getting this error/bug.

image
image

Edit

I have found the issue and fixed it. Thanks anyways

testimonials map issue

had an issue while mapping over testimonials Img tag. I think there has been one on the sanity backend schema.
I tried to map over testimonials.Imgur but it didn't work. so I debug the data responsive with :
{ {console.log(testimonials[0].imageUrl.asset._ref)} } and now it returns whats supposed to be returned

Screenshot 2023-03-07 at 6 14 48 PM

Screenshot 2023-03-07 at 6 14 48 PM

this is the what it returns now
Screenshot 2023-03-07 at 6 16 28 PM

Navbar animation flickering

I have a bug with the framer motion. My navbar when it opens with the nice animation at first has a flicker. Anyone had this problem before?

auto scroll

hello the scroll should target the section id as well how can i do that with react

Contact form not working

Messages are not posted to sanity and two errors are shown:

Warning: A component is changing an uncontrolled input to be controlled. This is likely caused by the value changing from undefined to a defined value, which should not happen. Decide between using a controlled or uncontrolled input element for the lifetime of the component.

Object { response: {โ€ฆ}, statusCode: 403, responseBody: "{\n "error": {\n "description": "Mutation(s) failed with 1 error(s)",\n "items": [\n {\n "error": {\n "description": "Insufficient permissions; permission \"create\" required",\n "permission": "create",\n "type": "insufficientPermissionsError"\n },\n "index": 0\n }\n ],\n "type": "mutationError"\n }\n}", details: {โ€ฆ}, stack: "", โ€ฆ }
โ€‹
details: Object { description: "Mutation(s) failed with 1 error(s)", items: (1) [โ€ฆ], type: "mutationError" }
โ€‹
message: "Mutation(s) failed with 1 error(s)"
โ€‹
name: "ClientError"
โ€‹
response: Object { url: "https://e3htzv4z.api.sanity.io/v2022-02-01/data/mutate/production?returnIds=true&returnDocuments=true&visibility=sync", method: "POST", statusCode: 403, โ€ฆ }
โ€‹
responseBody: "{\n "error": {\n "description": "Mutation(s) failed with 1 error(s)",\n "items": [\n {\n "error": {\n "description": "Insufficient permissions; permission \"create\" required",\n "permission": "create",\n "type": "insufficientPermissionsError"\n },\n "index": 0\n }\n ],\n "type": "mutationError"\n }\n}"
โ€‹
stack:
โ€‹
statusCode: 403

empty page

i just clone this project and run npm i, but when i start it its showing empty page, what is wrong?

error in skill section

Screenshot from 2022-03-14 17-04-47

Some error in the experience section of Skills.jsx file

If I replace fragment by div. and provide it with a key, then the error is gone, but a few functionalities don't work.

Navbar

When I click on navbar it's quite flickering on my system also tried with other browers and devices it's same problem

I am having issues with node-sass not being compatible

I keep receiving an error stating "Node Sass version 7.0.1 is incompatible with ^4.0.0".

The simple fix of uninstalling/installing node-sass is not working nor trying to install sass. Any advice would be super grateful!!

Thank you,
Lo

Can't Get React Frontend to work In New WSL Install

Hello Guys, I recently moved (or am still in the process of moving) to WSL on Windows for personal reasons.
I have successfully connected my Windows vs code to my Ubuntu WSL via the official plugin,
And I am running Node LTS version 18.16.0 which I installed via nvm on WSL Ubuntu.

The problem is when I run npm install in the sanity backend it works perfectly with no errors, but on the react frontend, it throws a lot of deprecation warnings, and finally lots of npm errors.
I plan to finish this project quickly to edit it to fit my use case.
Any help?

I have attached a copy of the errors in a txt file below
error.txt
I have also attached the logs
2023-05-23T22_12_23_193Z-debug-0.log

Kindly share solutions with me, I want to resume working on the project asap.

Email validation? (allow emails from .tech .io etc?)

The current project doesn't allow emails in the contact form from .tech, .io or anything other than .com/.co.uk etc
Where can I find in the project how to add validation for alternatives to .com/.co.uk?

Any help appreciated!

Not able to display the image from Testimonials section

I am not able to display the image using the imgURL property for the Testimonials section. As soon as I use this line :
<img src={urlFor(testimonials[currentIndex].imgURL)} alt={testimonials[currentIndex].name} />
I get this error :
Uncaught (in promise) Error: Unable to resolve image URL from source (undefined)

Nb: but I'm able to display the feedback, name and company properties from the same object so... I don't know what to do ๐Ÿ˜…

@adrianhajdin

Skill Experience Year Not in Timeline Order

I Create TimeLine of my work in sanity database of experience section. if i add 2022 first. After i will add 2018 it will goes on top of 2022. Next i add 2019 it will go top of 2018. i want to make it order-wise. how to do that ?
Screenshot 2022-07-23 133733

Page goes Blank After adding AppWrap

was following the tutorial from beginging step by step but got stuck at 2:03:00 where AppWrap was added to the Header and About section, worked perfectly on the video but decides to just go blank on mine(but keeps the cocial media icons and copyright). has anyone experienced this and how can i fix it

code before appwrap
code before appwrap

react app before appwrap
react app before appwrap

code after appwrap
code after appwrap

react app after appwrap
react app after appwrap

Hamburger not working properly in Mobile View

When I click on hamburger in mobile view it just opens the menu bar for fraction of seconds and after that it hides and when I click it again it doesn't work.

Can anyone help me with this issue.

The About Section is not updating via sanity. How to fix this? Help me to fix this issue

When I upload any thing in the ABouts via Sanity it is not showing in the website.
image

This is the backend:
image

This is the client.js file:
`import { createClient } from '@sanity/client'
import imageUrlBuilder from '@sanity/image-url'

export const client = createClient({
projectId: process.env.SANITY_PROJECT_ID,
dataset: 'production',
apiVersion: '2022-02-01',
useCdn: true,
token: process.env.SANITY_PROJECT_TOKEN,
ignoreBrowserTokenWarning: true,
})

const builder = imageUrlBuilder(client)

export const urlFor = (source) => builder.image(source)

`

This is the About.jsx file:
`import React, {useState, useEffect} from 'react'
import { motion } from "framer-motion"
import { images } from '../../constants'

import {client, urlFor} from '../../client'

import './About.scss'

const About = () => {

const [abouts, setAbouts] = useState([])

useEffect(() => {
const query = '*[_type == "abouts"]'

client.fetch(query)
  .then((data) => {
    setAbouts(data)
  })

}, [])

return (
<>

I know that Good Design
means Good Business

  <div className='app__profiles'>
    {abouts.map((about, index) => (
      <motion.div
        whileInView={{ opacity: 1}}
        whileHover={{ scale: 1.1}}
        transition={{ duration: 0.5, type: 'tween'}}
        className='app__profile-item'
        key={about.title + index}
      >
        <img src={urlFor(about.imgUrl)} alt={about.title}/>
        <h2 className='bold-text' style={{ marginTop: 20}}>{about.title}</h2>
        <p className='p-text' style={{ marginTop: 10}}>{about.description}</p>

      </motion.div>
    ))}
  </div>
</>

)
}

export default About`

Testimonial.jsx imgurl undefined

Hello,

I've been looking around for a fix to an issue others seem to be having regarding an error that states the imgurl is undefined. I tried different resolutions, the top one i tried involved changing the image schema name to imgUrl since we were previously using duplicate names as well as implemente new line of code:
{testimonials[currentIndex].name}.

instead of:
{testimonials[currentIndex].name}

I am still getting this error:
ERROR
Cannot read properties of undefined (reading 'asset')
TypeError: Cannot read properties of undefined (reading 'asset')
at Testimonial (http://localhost:3000/static/js/bundle.js:1566:100)
at renderWithHooks (http://localhost:3000/static/js/bundle.js:23438:22)
at updateFunctionComponent (http://localhost:3000/static/js/bundle.js:26318:24)
at beginWork (http://localhost:3000/static/js/bundle.js:28030:20)
at HTMLUnknownElement.callCallback (http://localhost:3000/static/js/bundle.js:13034:18)
at Object.invokeGuardedCallbackDev (http://localhost:3000/static/js/bundle.js:13078:20)
at invokeGuardedCallback (http://localhost:3000/static/js/bundle.js:13135:35)
at beginWork$1 (http://localhost:3000/static/js/bundle.js:32999:11)
at performUnitOfWork (http://localhost:3000/static/js/bundle.js:32247:16)
at workLoopSync (http://localhost:3000/static/js/bundle.js:32170:9)
ERROR
Cannot read properties of undefined (reading 'asset')
TypeError: Cannot read properties of undefined (reading 'asset')
at Testimonial (http://localhost:3000/static/js/bundle.js:1566:100)
at renderWithHooks (http://localhost:3000/static/js/bundle.js:23438:22)
at updateFunctionComponent (http://localhost:3000/static/js/bundle.js:26318:24)
at beginWork (http://localhost:3000/static/js/bundle.js:28030:20)
at beginWork$1 (http://localhost:3000/static/js/bundle.js:32977:18)
at performUnitOfWork (http://localhost:3000/static/js/bundle.js:32247:16)
at workLoopSync (http://localhost:3000/static/js/bundle.js:32170:9)
at renderRootSync (http://localhost:3000/static/js/bundle.js:32143:11)
at performSyncWorkOnRoot (http://localhost:3000/static/js/bundle.js:31835:24)
at flushSyncCallbacks (http://localhost:3000/static/js/bundle.js:19871:26)

As opposed to the previous error i was getting previously from the video and src code:

Unable to resolve image URL from source (undefined)
at urlForImage (http://localhost:3000/static/js/bundle.js:2822:13)
at ImageUrlBuilder.url (http://localhost:3000/static/js/bundle.js:3231:14)
at ImageUrlBuilder.toString (http://localhost:3000/static/js/bundle.js:3235:19)
at testStringCoercion (http://localhost:3000/static/js/bundle.js:9547:17)
at checkAttributeStringCoercion (http://localhost:3000/static/js/bundle.js:9553:18)
at setValueForProperty (http://localhost:3000/static/js/bundle.js:10122:15)
at setInitialDOMProperties (http://localhost:3000/static/js/bundle.js:17860:11)
at setInitialProperties (http://localhost:3000/static/js/bundle.js:18035:7)
at finalizeInitialChildren (http://localhost:3000/static/js/bundle.js:18915:7)
at completeWork (http://localhost:3000/static/js/bundle.js:28527:21)

Please help

Parsing error: Cannot find module '@babel/preset-env'

Issue: Although sanity compiled successfully and is able to run on browser, I'm getting this error while setting up Schemas for Sanity. Should I be worried?

What I've tried: installed @babel/preset-env package

Screenshot 2022-06-03 at 00 18 05

Images in About Section doesn't show after connecting to Sanity.

Hi everyone, could I please ask for assistance with the following issue?

I am at this section of the youtube tutorial.
Screenshot 2022-09-13 at 4 42 23 PM

Everything was working perfectly, but once I connected to Sanity, this website section doesn't show.
Screenshot 2022-09-13 at 4 43 44 PM

I have tried the following but nothing seems to work:

  1. Checking that in my client.js I use 'projectId' and not 'projectID'
  2. Instead of using 'process.env.REACT_APP_SANITY_PROJECT_ID' use the actual project ID. When I use 'process.env.REACT_APP_SANITY_PROJECT_ID' it shows a blank page. When I use the actual project ID I can see the website but the about us section is missing.

While following the tutorial the only thing I did that differed from the video was at 1:48:20 of the video where after he created the .env file he reloaded the application via ctrl c I am on a mac so in my terminal I used man kill instead.

Please find my code below:
.env
Screenshot 2022-09-13 at 4 39 41 PM

client.js
Screenshot 2022-09-13 at 4 40 54 PM

About.jsx
Screenshot 2022-09-13 at 4 53 54 PM

Having issues with the work section - Errors attached

image
If I remove work entirely from index.js and app.js my application works completely fine...Can some please help me troubleshoot what's the problem??

For the record, I even copied the Work.jsx directly from the code on github..Thanks!

contact Form 403 on sanity call

Hi,
first of all, thank for your sharing .
I am trying to rebuild your application in angular :

but, when i try the contact form i get the following a 403 with the following message :

{"error":{"description":"the mutation(s) failed: Insufficient permissions; permission "create" required","items":[{"error":{"description":"Insufficient permissions; permission "create" required","permission":"create","type":"insufficientPermissionsError"},"index":0}],"type":"mutationError"}}

Do you have any idea ?

Best regards Sofiane.

client.fetch gives me an empty array

useEffect(() => {
const query = '*[_type == "abouts"]'
client.fetch(query)
.then((data)=>{
setAbouts(data)
console.log(data)
})
}, [])

i am receiving an empty array and nothing displays

Tutorial is not compatible with Sanity V3

The steps in the video do not work with the latest version of Sanity, version 3.

i.e. It's no longer possible to follow the exact steps of the video's Sanity setup and result in getting the Sanity Server up and running with the schema displaying.

There's a new prompt to setup the project for TypeScript (yes/no ?). Need clarity on that.

The project uses a schema.js file inside /schemas/, but installing the latest Sanity generates index.js file, with different code to schema.js (excluding what gets added to pull in the project's other schemas files).

It would be great if this could be addressed or if I could get some help on a workaround as I would love to build this tutorial without roadblocks.

@adrianhajdin and team, I love your work! Thank you for investing into the community.

Site renders just for a few seconds after adding useEffect Hook and fetching data from sanity.

import React, { useEffect, useState } from "react";
import { motion } from "framer-motion";

import { urlFor, client } from "../../client";

import "./About.scss";

const About = () => {
	const [abouts, setAbouts] = useState([]);

	useEffect(() => {
		const query = '*[_type == "abouts"]';
		client.fetch(query).then((data) => {
			setAbouts(data);
		});
	}, []);

	return (
		<>
			<h2 className="head-text">
				I Know That <span>Good Devlopment</span>
				<br /> Means <span>Good Business</span>
			</h2>

			<div className="app__profiles">
				{abouts.map((about, index) => (
					<motion.div
						whileInView={{ opacity: 1 }}
						whileHover={{ scale: 1.1 }}
						transition={{ duration: 0.5, type: "tween" }}
						className="app__profile-item"
						key={about.title + index}
					>
						<img src={urlFor(about.imgUrl)} alt="about.title" />
						<h2 className="bold-text" style={{ marginTop: 20 }}>
							{about.title}
						</h2>
						<p className="p-text" style={{ marginTop: 10 }}>
							{about.description}
						</p>
					</motion.div>
				))}
			</div>
		</>
	);
};

export default About;

I think the problem occurred when I added about in About Schema.

SanityClient issue

So I was getting an error in my client.js file that sanityClient is not exported from sanity/client. I figured that it was deprecated, so I used createClient instead of sanityClient:

`import { createClient } from '@sanity/client';
import { imageUrlBuilder } from '@sanity/image-url';

export const client = createClient({
projectId: process.env.REACT_APP_SANITY_PROJECT_ID,
dataset: 'production',
apiVersion: '2023-05-03',
useCdn: true,
token: process.env.REACT_APP_SANITY_TOKEN,
});

const builder = imageUrlBuilder(client);

export const urlFor = (source) => builder.image(source);`

But now I am getting a TypeError: Object(...) is not a function
And apparently its in node modules?

Screenshot (101)

What do I do?

Module not found

Can anyone help me?
I'm an hour into video and it wont even load a simple page. I get the following error.

Compiled with problems:

ERROR in ./src/App.js 6:0-39

Module not found: Error: Can't resolve './components/' in '/home/dan/Desktop/lake-portfolio/frontend_react/src'

i tried everything I can think of. even going to components/navbar/navbar.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.