Update Tinder.js
This commit is contained in:
parent
80e8fbf328
commit
18b3e0b819
@ -1,6 +1,6 @@
|
||||
import React, {useEffect, useState} from 'react';
|
||||
import TinderCard from 'react-tinder-card';
|
||||
import './Tinder.css'
|
||||
import './Tinder.css';
|
||||
|
||||
const db = [
|
||||
{
|
||||
@ -45,7 +45,7 @@ const db = [
|
||||
|
||||
useEffect(() => {
|
||||
let uniqueTags = [];
|
||||
if (cardId.length === swiped.id) {
|
||||
if (cardId.length === 1) {
|
||||
uniqueTags = cardId.filter(function(elem, pos) {
|
||||
return cardId.indexOf(elem) === pos;})
|
||||
console.log(uniqueTags);
|
||||
@ -72,7 +72,7 @@ const db = [
|
||||
<div className='card'>
|
||||
<div
|
||||
className='card-content'
|
||||
style={{ backgroundImage: `url(${character.url})` }}
|
||||
// style={{ backgroundImage: `url(${character.url})` }}
|
||||
>
|
||||
<h3>{character.name}</h3>
|
||||
</div>
|
||||
|
Loading…
x
Reference in New Issue
Block a user